package cn.edu.swu.cy;

public class App {

    public static void main(String[] args) {

        // ======== 学生信息部分 ========
        System.out.println("--- 学生信息 ---");

        Student s1 = new Student("s2024001", "张三", "男", 20);
        s1.showInfo();
        System.out.println("--------------");

        Student s2 = new Student("s2024002", "李四", "女", 19);
        s2.showInfo();
        System.out.println("--------------\n");

        // ======== 课程信息部分 ========
        System.out.println("--- 课程信息 ---");
        Course c1 = new Course("C001", "JavaWeb应用开发", "刘教授");
        c1.showInfo();
        System.out.println("--------------");

        Course c2 = new Course("C002", "数据库原理", "王老师");
        c2.showInfo();
        System.out.println("--------------");

        // 用setter修改属性
        s1.setAge(21);           // 修改s1的年龄为21
        c2.setTeacher("李老师");  // 修改c2的任课教师为“李老师”

    }

}
